/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.me.entityBeans;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Administrador
 */
@Entity
@Table(name = "T_CAMBIO_DOLAR", catalog = "", schema = "OMEGA")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "TCambioDolar.findAll", query = "SELECT t FROM TCambioDolar t"),
    @NamedQuery(name = "TCambioDolar.findByNIdCambioMonedaPk", query = "SELECT t FROM TCambioDolar t WHERE t.nIdCambioMonedaPk = :nIdCambioMonedaPk"),
    @NamedQuery(name = "TCambioDolar.findByNCambioVenta", query = "SELECT t FROM TCambioDolar t WHERE t.nCambioVenta = :nCambioVenta"),
    @NamedQuery(name = "TCambioDolar.findByNCambioCompra", query = "SELECT t FROM TCambioDolar t WHERE t.nCambioCompra = :nCambioCompra")})
public class TCambioDolar implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "N_ID_CAMBIO_MONEDA_PK")
    private Short nIdCambioMonedaPk;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Basic(optional = false)
    @Column(name = "N_CAMBIO_VENTA")
    private BigDecimal nCambioVenta;
    @Basic(optional = false)
    @Column(name = "N_CAMBIO_COMPRA")
    private BigDecimal nCambioCompra;

    public TCambioDolar() {
    }

    public TCambioDolar(Short nIdCambioMonedaPk) {
        this.nIdCambioMonedaPk = nIdCambioMonedaPk;
    }

    public TCambioDolar(Short nIdCambioMonedaPk, BigDecimal nCambioVenta, BigDecimal nCambioCompra) {
        this.nIdCambioMonedaPk = nIdCambioMonedaPk;
        this.nCambioVenta = nCambioVenta;
        this.nCambioCompra = nCambioCompra;
    }

    public Short getNIdCambioMonedaPk() {
        return nIdCambioMonedaPk;
    }

    public void setNIdCambioMonedaPk(Short nIdCambioMonedaPk) {
        this.nIdCambioMonedaPk = nIdCambioMonedaPk;
    }

    public BigDecimal getNCambioVenta() {
        return nCambioVenta;
    }

    public void setNCambioVenta(BigDecimal nCambioVenta) {
        this.nCambioVenta = nCambioVenta;
    }

    public BigDecimal getNCambioCompra() {
        return nCambioCompra;
    }

    public void setNCambioCompra(BigDecimal nCambioCompra) {
        this.nCambioCompra = nCambioCompra;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (nIdCambioMonedaPk != null ? nIdCambioMonedaPk.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TCambioDolar)) {
            return false;
        }
        TCambioDolar other = (TCambioDolar) object;
        if ((this.nIdCambioMonedaPk == null && other.nIdCambioMonedaPk != null) || (this.nIdCambioMonedaPk != null && !this.nIdCambioMonedaPk.equals(other.nIdCambioMonedaPk))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.me.entityBeans.TCambioDolar[ nIdCambioMonedaPk=" + nIdCambioMonedaPk + " ]";
    }
    
}
